home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
PROGNG_C
/
CSUBR.LZH
/
CENTER.C
< prev
next >
Wrap
C/C++ Source or Header
|
1985-11-17
|
479b
|
26 lines
#include "stdio.h"
/*******************************************************/
center(line, linlen)
int linlen;
char *line;
{
char *cp, *wp;
int countr, len;
char c;
len = strlen(trim(line)); /* get non-blank length */
/* output leading blanks */
for (countr=1; countr < (linlen - len)/2; countr++)
putc(' ', stdout);
/* output non-blank chars */
while (c = *cp++)
putc(c, stdout);
putc('\n', stdout); /* end of record */
}